<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Generator" content="Asbru Web Content Editor">
<meta http-equiv="Copyright" content="(C) 2002-2006 - Asbru Ltd. - www.asbrusoft.com">
<script type="text/javascript" src="webeditor.properties.js"></script>
<title>Asbru Web Content Editor</title>
<link rel="stylesheet" href="../dtree.css" type="text/css">
<script type="text/javascript" src="../dtree.js"></script>
<link rel="stylesheet" type="text/css" href="../hardcore.css"> 
<link rel="stylesheet" type="text/css" href="webeditor.css">
<script type="text/javascript">

document.title = HtmlDecode(Text('hyperlinklist_title'));

function requestParameter(name) {
	var value = "";
	if (start = request.indexOf("?"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	} else if (start = request.indexOf("&"+name+"=")+1) {
		value = request.substring(start+name.length+1);
	}
	if (value.indexOf("&")+1) {
		value = value.substring(0, value.indexOf("&"));
	}
	value = unescape(value);
	return value;
}

var request = "" + window.location;
editor = requestParameter("editor");
request_title = requestParameter("title");
request_section = requestParameter("section");
request_category = requestParameter("category");

function openit(title, href) {
	if (href != "") {
		parent.tag["href"] = href;
		if (matches = href.match(/id=(\d+)\D*$/)) {
			id = matches[1];
		} else if (matches = href.match(/add=(\d+)\D*$/)) {
			id = matches[1];
		} else {
			id = '';
		}
<% If ((upload_path <> "") AND (enable_upload = "yes")) Then %>
		if ((request_section == "Pages") || (request_section == "Images") || (request_section == "Files") || (request_section == "Links") || (request_section == "Products")) {
			if (document.getElementById) {
				if (document.getElementById('create_file')) document.getElementById('create_file').href = 'hyperlinkuploader.asp?id='+id+'&action=Create&section=' + escape(request_section) + '&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
			} else if (document.all) {
				if (document.all['create_file']) document.all['create_file'].href = 'hyperlinkuploader.asp?id='+id+'&action=Create&section=' + escape(request_section) + '&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
			}
		}
		if ((request_section == "Pages") || (request_section == "Images") || (request_section == "Files") || (request_section == "Links") || (request_section == "Products")) {
			if (document.getElementById) {
				if (document.getElementById('update_file')) document.getElementById('update_file').href = 'hyperlinkuploader.asp?id='+id+'&action=Update&section=' + escape(request_section) + '&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
			} else if (document.all) {
				if (document.all['update_file']) document.all['update_file'].href = 'hyperlinkuploader.asp?id='+id+'&action=Update&section=' + escape(request_section) + '&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor;
			}
		}
		if ((request_section == "Pages") || (request_section == "Images") || (request_section == "Files") || (request_section == "Links") || (request_section == "Products")) {
			if (document.getElementById) {
				if (document.getElementById('delete_file')) document.getElementById('delete_file').href = 'hyperlinkuploader.asp?id='+id+'&action=Delete&section=' + escape(request_section) + '&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor + '&href='+escape(href);
			} else if (document.all) {
				if (document.all['delete_file']) document.all['delete_file'].href = 'hyperlinkuploader.asp?id='+id+'&action=Delete&section=' + escape(request_section) + '&category=' + escape(request_category) + '&title=' + escape(title) + '&editor=' + editor + '&href='+escape(href);
			}
		}
<% End If %>
		if (parent.hyperlinkpreview && parent.hyperlinkpreview.location) parent.hyperlinkpreview.location.href = 'hyperlinkpreview.asp?editor=' + editor + '&title=' + escape(title) + '&href='+escape(href);
		if (parent.hyperlinkinsert && parent.hyperlinkinsert.location) parent.hyperlinkinsert.location.href = 'hyperlinkinsert.asp?editor=' + editor + '&title=' + escape(title) + '&href='+escape(href);
	}
}

</script>
</head>
<body onLoad="parent.hyperlinklist_ready();">
<div class="dtree">
<% If ((upload_path <> "") AND (enable_upload = "yes")) Then %>
<script type="text/javascript">
	if ((request_title != "") && ((request_section == "Pages") || (request_section == "Images") || (request_section == "Files") || (request_section == "Links") || (request_section == "Products"))) {
		document.writeln('<a id="create_file" target="hyperlinkinsert" href="hyperlinkuploader.asp?action=Create&section=' + request_section + '&category=' + escape(request_category) + '&editor=' + editor + '"><img alt="" src="../dtree/page.gif">' + Text('hyperlinklist_create') + '<\/a>');
		if ((request_section == "Pages") || (request_section == "Images") || (request_section == "Files") || (request_section == "Links")) {
			document.writeln('<a id="update_file" target="hyperlinkinsert" href="javascript:alert(\'' + HtmlDecode(Text('hyperlinklist_updateitem')) + '\');"><img alt="" src="../dtree/page.gif">' + Text('hyperlinklist_update') + '<\/a>');
		}
		document.writeln('<a id="delete_file" target="hyperlinkinsert" href="javascript:alert(\'' + HtmlDecode(Text('hyperlinklist_deleteitem')) + '\');"><img alt="" src="../dtree/trash.gif">' + Text('hyperlinklist_delete') + '<\/a>');
	} else {
		document.writeln('&nbsp;');
	}
</script>
<% Else %>
<script type="text/javascript">
	if ((request_title != "") && ((request_section == "Pages") || (request_section == "Images") || (request_section == "Files") || (request_section == "Links") || (request_section == "Products"))) {
		document.writeln('<a id="create_file" target="hyperlinkinsert" href="javascript:alert(HtmlDecode(Text(\'disabled\')));"><img alt="" src="../dtree/page.gif">' + Text('hyperlinklist_create') + '<\/a>');
		if ((request_section == "Pages") || (request_section == "Images") || (request_section == "Files") || (request_section == "Links")) {
			document.writeln('<a id="update_file" target="hyperlinkinsert" href="javascript:alert(HtmlDecode(Text(\'disabled\')));"><img alt="" src="../dtree/page.gif">' + Text('hyperlinklist_update') + '<\/a>');
		}
		document.writeln('<a id="delete_file" target="hyperlinkinsert" href="javascript:alert(HtmlDecode(Text(\'disabled\')));"><img alt="" src="../dtree/trash.gif">' + Text('hyperlinklist_delete') + '<\/a>');
	} else {
		document.writeln('&nbsp;');
	}
</script>
<% End If %>
</div>
<hr>
<div class="dtree">
	<script type="text/javascript">
		<!--
		menuitem = 0;
		hyperlinklistMenu = new dTree('hyperlinklistMenu');
		menuitem_links = menuitem;
		if ((request_section != "") && (request_title != "")) {
			hyperlinklistMenu.add(menuitem++,-1,request_title,'','','',true,'imgfolder.gif');
<% If (Typename(links) <> "Empty") Then %>
			var myoptionkeys = new Array();
			var myoptions = new Object();
<%
	Dim RegEx, pageMatches, imageMatches, fileMatches, textMatches
	Set RegEx = new RegExp
	RegEx.Global = True
	RegEx.IgnoreCase = True
	RegEx.Pattern = allowed_files
	For Each file In links.Files
		entry = file.Name
		Set Matches = regEx.Execute(entry)
		If (Matches.Count > 0) Then
%>
			myoptionkeys[myoptionkeys.length] = '<%= entry %>';
			myoptions['<%= entry %>'] = '<%= links_path & entry %>';
<%
		End If
	Next
%>
			function mysort(a,b) {
				if (a.toLowerCase() < b.toLowerCase()) return -1;
				if (a.toLowerCase() > b.toLowerCase()) return 1;
				return 0;
			}
			myoptionkeys.sort(mysort);
			for (myoption in myoptionkeys) if (typeof(myoptionkeys[myoption]) != "function") {
				if (myoptionkeys[myoption].substring(myoptionkeys[myoption].length-4) == ".swf") {
					mediaclass = "flash";
				} else if (myoptionkeys[myoption].substring(myoptionkeys[myoption].length-6) == ".class") {
					mediaclass = "applet";
				} else {
					mediaclass = "image";
				}
				hyperlinklistMenu.add(menuitem++,menuitem_links,myoptionkeys[myoption],'javascript:openit(\'' + myoptionkeys[myoption] + '\',\'' + myoptions[myoptionkeys[myoption]] + '\')','','',true,'');
			}
<% Else %>

			if (request_section == "Pages") {
				hyperlinklistMenu.add(menuitem++,menuitem_links,'Asbru WCE example','javascript:openit(\'Asbru WCE example\',\'/hardcore/webeditor/index.asp\')','','',true,'');
				hyperlinklistMenu.add(menuitem++,menuitem_links,'Asbru WCE MSIE v4.0+ example','javascript:openit(\'Asbru WCE MSIE v4.0+ example\',\'/hardcore/webeditor/index1.asp\')','','',true,'');
				hyperlinklistMenu.add(menuitem++,menuitem_links,'Asbru WCE MSIE v5.5+/Mozilla example','javascript:openit(\'Asbru WCE MSIE v5.5+/Mozilla example\',\'/hardcore/webeditor/index2.asp\')','','',true,'');
			}

			if (request_section == "Images") {
				hyperlinklistMenu.add(menuitem++,menuitem_links,'Asbru logo','javascript:openit(\'Asbru logo\',\'http://www.asbrusoft.com/hardcore/logo.gif\')','','',true,'');
				hyperlinklistMenu.add(menuitem++,menuitem_links,'hyperlinkmanager','javascript:openit(\'hyperlinkmanager\',\'/hardcore/webeditor/hyperlinkmanager.jpg\')','','',true,'');
				hyperlinklistMenu.add(menuitem++,menuitem_links,'mediamanager','javascript:openit(\'mediamanager\',\'/hardcore/webeditor/mediamanager.jpg\')','','',true,'');
			}

			if (request_section == "Files") {
				hyperlinklistMenu.add(menuitem++,menuitem_links,'User & Deleveloper Guide','javascript:openit(\'User & Deleveloper Guide\',\'/hardcore/webeditor/UserDeveloperGuide.pdf\')','','',true,'');
			}

			if (request_section == "Links") {
				hyperlinklistMenu.add(menuitem++,menuitem_links,'Asbru Software','javascript:openit(\'Asbru Software\',\'http://www.asbrusoft.com\')','','',true,'');
				hyperlinklistMenu.add(menuitem++,menuitem_links,'Web Content Management','javascript:openit(\'Web Content Management\',\'http://wcm.asbrusoft.com\')','','',true,'');
				hyperlinklistMenu.add(menuitem++,menuitem_links,'Web Content Editor','javascript:openit(\'Web Content Editor\',\'http://editor.asbrusoft.com\')','','',true,'');
			}
<% End If %>

		}
		hyperlinklistMenu.draw();
		if (parent.tag["href"]) hyperlinklistMenu.selectURLsubstring(parent.tag["href"]);
		//-->
	</script>
</div>
</body>
</html>
